<template>
    <router-link :to="to" v-if="to">
        <slot></slot>
    </router-link>
    <span  v-else>
        <slot></slot>
    </span>
</template>
<script>
export default {
  props: {
    to: {
      type: [Object, String]
    }
  }
}
</script>
